<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../../static/css/main.css">
    <script type="text/javascript" src="../../static/js/jquery-1.12.4.min.js"></script>
    <script src="../../static/js/markdown_main.js"></script>
    <script type="text/javascript" src="../../static/js/index.js"></script>

    <title>hy的web</title>
</head>
<body>
<header>
    <!--头部-->
    <div class="box">
        <img src="../../static/img/logo.png" class="logo">
        <!--导航栏-->
        <div class="right bar">
            <!--选项-->
            <a href="{{ url_for('index_blu.index') }}" class="home_b"><img src="../../static/img/home.png"></a>
            <a href="{{ url_for('user_blu.user_write_new') }}" class=""><img src="../../static/img/write.png"></a>
            <a href="{{ url_for('user_blu.user') }}" class="ava_b"><img src="{{ava}}"></a>
            {%if user%}
            <a href="/passport/logout"><img src="../../static/img/logout.png"></a>
            {%endif%}
        </div>
    </div>
</header>

<div class="box centre">
    <!--主体-->
    <div class="left classify">
        <!--左边分类栏-->
        <ul>
            <li class="choose"><a href="#" value=0><b>推荐</b></a></li>
            {%for i in classify%}
            <br>
            <li><a href="#" value={{i.id}}>{{i.name}}</a></li>
            {%endfor%}
        </ul>
    </div>
    <!--右边-->
    <div class="right">
        <!--搜索栏-->
<!--        <input id="seek" type="text">-->
<!--        <input id='sub' type="submit" value="搜索">-->
        <!--文章-->
        <ul class="blog_list">
            {% for i in article %}
            <li class="blog">
                <a href="/to_detail/{{i.id}}" class="article_title"><h3>{{i.title}}</h3></a>
                {{i.content[:50]}}......
                <br><br>
                <a href="/to_writer/{{i.user_id}}" class="left article_writer"><img src="{{i.user.avatar_url}}">{{i.user.nick_name}}</a>
                <ul href="#" class="right">
                    <li><img src="../../static/img/coll.png">{{i.collector.count()}}<!--收藏--></li>
                    <li><img src="../../static/img/like.png">{{i.praise.count()}}
                        <!--点赞--></li>
                    <li><img src="../../static/img/clicks.png">{{i.clicks}}<!--浏览--></li>
                </ul>
            </li>
            {% endfor %}
        </ul>
    </div>
</div>
</body>
</html>